package com.lecloud.api.connect;

import java.util.Map;

import cn.edu.live.util.TimeUtil;

import com.alibaba.fastjson.JSONObject;
import com.lecloud.constant.Const;
import com.lecloud.model.PublicParam;
import com.lecloud.util.LeCloudVerify;
import com.lecloud.util.Sender;

/**
 * 直播活动查询接口
 * 
 * @author zhagz
 * 
 */
public class QueryActivity {

	private static final String queryActivity_method = "lecloud.cloudlive.activity.search";
	private static final String queryActivity_ver = "4.1";

	public JSONObject searchActivity(String activityId, String activityName, int activityStatus, int offSet,
			int fetchSize) {
		Map<String, String> map = PublicParam.getPublicParamMap(queryActivity_method, queryActivity_ver, Const.userid,
				TimeUtil.currentTime());
		map.put("activityId", activityId);
		map.put("activityName", activityName);
		map.put("activityStatus", activityStatus + "");
		map.put("offSet", offSet + "");
		map.put("fetchSize", fetchSize + "");

		String sign = LeCloudVerify.getSign(map);
		map.put("sign", sign);
		JSONObject js = Sender.get(Const.common_url, map);

		return js;
	}
}
